#!/bin/bash


#------------------------------------------------------------------------------
#Filename:	74826-gunzip.sh
#Version:	1.1
#Date:	        2013/08/05
#Author:	yuanhui.shi
#Email:	        yuanhui.shi@cs2c.com.cn
#Summary:	02.01系统核心功能-06基础命令行工具-18gzip压缩工具-04gzip程序解压文件
#Notes:	        检查解压命令gunzip
#Copyright:	China Standard Software Co.,Ltd.
#History:
#	        Version 1.0,2013/08/05
#	        -The first one
#	        Version 1.1,2013/09/09
#	        -Modify the script to satisfy the shell standard
#------------------------------------------------------------------------------


PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin
export PATH

source ../../lib/Echo.sh

function CleanData ()
{
  rm -rf test
  rm -rf log1

  EchoInfo "74826-gunzip.sh执行完毕"
}

trap "CleanData" EXIT

EchoInfo "检验gunzip命令是否可用"
echo "hello!" > test
gzip test
gunzip test.gz
LANG=C ls -l test.gz &> log1

[ "`cat test`" == "hello!" ] &&  cat log1|grep 'test.gz: No such file or directory'
EchoResult "gunzip 命令可用"


